package com.woniu.microcommunityserver.tribal.mapper;

import com.woniu.microcommunityserver.tribal.entity.TribalCategoryInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface TribalCategoryInfoMapper {
    @Select("select id,tribal_category_name,tribal_category_state from " +
            "tribal_category_info where tribal_category_state=0")
    @ResultMap(value ="tribalCategoryInfoMap")
    List<TribalCategoryInfoEntity> findTribalCategory();

    @Select("select tribal_category_name from tribal_category_info where id=#{id}")
    String findCategory(Integer id);
}
